import Vue from 'vue'
import Vuex from 'vuex'
import login from '@/store/modules/login'
import cart from '@/store/modules/cart'
import address from '@/store/modules/address'
import order from '@/store/modules/order'

Vue.use(Vuex)

export default new Vuex.Store({
  getters: {
    token (state) {
      return state.login.userInfo.token
    }
  },
  modules: {
    login,
    cart,
    address,
    order
  }
})
